# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=cni-plugins
pkgver=1.1.1
pkgrel=3
pkgdesc="Some standard networking plugins, maintained by the CNI team"
options="!check"
url="https://www.cni.dev/"
arch="all"
license="Apache-2.0"
makedepends="go bash linux-headers"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/containernetworking/plugins/archive/v$pkgver.tar.gz"
builddir="$srcdir/plugins-$pkgver"

build() {
	bash ./build_linux.sh -ldflags "-s -w -X github.com/containernetworking/plugins/pkg/utils/buildversion.BuildVersion=v$pkgver"
}

package() {
	install -Dm755 -t "$pkgdir"/usr/libexec/cni bin/*
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

sha512sums="
03da31caee5f9595abf65d4a551984b995bc18c5e97409549f08997c5a6a2b41a8950144f8a5b4f810cb401ddbe312232d2be76ec977acf8108eb490786b1817  cni-plugins-1.1.1.tar.gz
"
